﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <!-- Toolbar resource-->

    <BitmapImage x:Key="fileopen" UriSource="../Images/fileopen.png" />
    <BitmapImage x:Key="reload" UriSource="../Images/reload.png" />
    <BitmapImage x:Key="excelExportAll" UriSource="../Images/excel_ico.png" />
    <BitmapImage x:Key="excelExportOne" UriSource="../Images/excel_ico_vert.png" />

    <Style x:Key="ButtonImageStyle" TargetType="{x:Type Image}">
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.5" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <!-- DataGrid Angle header-->

    <Style x:Key="DataGridColumnHeaderAngle" TargetType="DataGridColumnHeader">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
                    <Border BorderBrush="Gray" BorderThickness="0.5">
                        <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Left">
                            <StackPanel.LayoutTransform>
                                <RotateTransform Angle="-90"/>
                            </StackPanel.LayoutTransform>
                            <TextBlock Text="{Binding}" VerticalAlignment="Bottom" HorizontalAlignment="Left"  />
                        </StackPanel>
                    </Border>
                </ControlTemplate>    
            </Setter.Value>
        </Setter>
    </Style>

    <!-- DataGrid result item style-->
    
    <DataTemplate x:Key="CustomTemplate">
        <TextBlock Text="{Binding Path=IsSuccessful}">
            <TextBlock.Style>
                <Style TargetType="TextBlock">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding IsSuccessful}" Value="True">
                            <Setter  Property="Foreground" Value="Green" />
                        </DataTrigger>
                        <DataTrigger Binding="{Binding IsSuccessful}" Value="False">
                            <Setter  Property="Foreground" Value="Red" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </TextBlock.Style>
        </TextBlock>
    </DataTemplate>

    <!-- Details expander header style -->
    <Style x:Key="DetailsExpanderHeaderAngle" TargetType="Expander">
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid MaxWidth="15">
                        <TextBlock Text="{Binding}" RenderTransformOrigin="0.5,0.5" 
                                   HorizontalAlignment="Right">
                            <TextBlock.LayoutTransform>
                                <RotateTransform Angle="-90" />
                            </TextBlock.LayoutTransform>
                        </TextBlock>
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>